import 'package:flutter/material.dart';
import 'package:zhongyiapp/widgets/custom_app_bar.dart';
import 'package:zhongyiapp/pages/study/widgets/study_grid.dart';

class StudyPage extends StatelessWidget {
  const StudyPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const CustomAppBar(title: '学习'),
      body: SingleChildScrollView(
        child: Column(
          children: [
            // 顶部搜索栏
            Container(
              padding: const EdgeInsets.all(16),
              color: const Color(0xFFBFA47C),
              child: Container(
                padding: const EdgeInsets.symmetric(horizontal: 16),
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(24),
                ),
                child: const TextField(
                  decoration: InputDecoration(
                    hintText: '搜索课程、讲座...',
                    border: InputBorder.none,
                    icon: Icon(Icons.search),
                  ),
                ),
              ),
            ),
            // 学习内容网格
            const StudyGrid(),
          ],
        ),
      ),
    );
  }
}
